﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FlexiCommerce.Collections;
using FlexiCommerce.Components;

namespace FlexiCommerce
{
    public static class Extensions
    {
        public static ItemList<T> ToItemList<T>(this IList<IHierarchicalPersistenceItem> source)
            where T :PersistenceItem
        {
            ItemList<T> list = new ItemList<T>();
            foreach(T item in source)
            {
                list.Add(item);
            }
            return list;
        }
    }
}
